package com.ruoyi.tranShort.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.tranShort.mapper.ShortClassGradeMapper;
import com.ruoyi.tranShort.domain.ShortClassGrade;
import com.ruoyi.tranShort.service.IShortClassGradeService;

/**
 * 班别管理Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-08-15
 */
@Service
public class ShortClassGradeServiceImpl implements IShortClassGradeService 
{
    @Autowired
    private ShortClassGradeMapper shortClassGradeMapper;

    /**
     * 查询班别管理
     * 
     * @param id 班别管理主键
     * @return 班别管理
     */
    @Override
    public ShortClassGrade selectShortClassGradeById(Long id)
    {
        return shortClassGradeMapper.selectShortClassGradeById(id);
    }

    /**
     * 查询班别管理列表
     * 
     * @param shortClassGrade 班别管理
     * @return 班别管理
     */
    @Override
    public List<ShortClassGrade> selectShortClassGradeList(ShortClassGrade shortClassGrade)
    {
        return shortClassGradeMapper.selectShortClassGradeList(shortClassGrade);
    }

    /**
     * 新增班别管理
     * 
     * @param shortClassGrade 班别管理
     * @return 结果
     */
    @Override
    public int insertShortClassGrade(ShortClassGrade shortClassGrade)
    {
        shortClassGrade.setCreateTime(DateUtils.getNowDate());
        return shortClassGradeMapper.insertShortClassGrade(shortClassGrade);
    }

    /**
     * 修改班别管理
     * 
     * @param shortClassGrade 班别管理
     * @return 结果
     */
    @Override
    public int updateShortClassGrade(ShortClassGrade shortClassGrade)
    {
        return shortClassGradeMapper.updateShortClassGrade(shortClassGrade);
    }

    /**
     * 批量删除班别管理
     * 
     * @param ids 需要删除的班别管理主键
     * @return 结果
     */
    @Override
    public int deleteShortClassGradeByIds(Long[] ids)
    {
        return shortClassGradeMapper.deleteShortClassGradeByIds(ids);
    }

    /**
     * 删除班别管理信息
     * 
     * @param id 班别管理主键
     * @return 结果
     */
    @Override
    public int deleteShortClassGradeById(Long id)
    {
        return shortClassGradeMapper.deleteShortClassGradeById(id);
    }
}
